package com.exception.demo01;

public class Test {
    public static void main(String[] args) {
        int a = 1;
        int b = 0;

        //假设捕获多个异常：从小到大！
        try{//try监控区域
            System.out.println(a/b);
        }catch(Error e){//catch捕获异常
            System.out.println("Error");
        }catch(Exception e){
            System.out.println("Exception");

        } catch(Throwable t) {
            System.out.println("Throwable");

        } finally{//finally处理善后工作
            System.out.println("finally");
        }


    }
    public void a(){
        b();
    }
    public void b(){
        a();
    }
}
